//
//  FWSMyMenuReusableView.m
//  iOSFastWorkStateClientOC
//
//  Created by 肖兰月 on 2018/9/21.
//  Copyright © 2018年 浙江快工网络科技有限公司. All rights reserved.
//

#import "LLChannelReusableView.h"

@interface LLChannelReusableView ()
@property (strong, nonatomic) LLButton *editBtn;
@property (strong, nonatomic) UILabel *titleLbl;
@end

@implementation LLChannelReusableView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    _editBtn = [LLInitBaseViewTool buttonWithTitle:@"确定" image:nil titleColor:LLColor(225, 0, 0) font:12];
    _editBtn.frame = CGRectMake(self.width-50-13, (self.height-24)/2.0, 50, 24);
    _editBtn.layer.cornerRadius = 12;
    _editBtn.layer.borderColor = LLColor(225, 0, 0).CGColor;
    _editBtn.layer.borderWidth = 1;
    [_editBtn addTarget:self action:@selector(editBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_editBtn];
    
    _titleLbl = [LLInitBaseViewTool labelWithText:nil textColor:nil font:0 textAlignment:NSTextAlignmentLeft];
    _titleLbl.frame = CGRectMake(15, 0, 200, self.height);
    _titleLbl.attributedText = [NSAttributedString attributedStringsWithFrontText:@"我的频道" frontFont:15 frontColor:UIColor.blackColor backText:@"  点击进入频道" backFont:13 backColor:LLColorRGB(136)];
    [self addSubview:_titleLbl];
}

// 点击了编辑按钮
- (void)editBtnClick {
    if (self.delegate && [self.delegate respondsToSelector:@selector(channelReusableViewDidClickEditBtn)]) {
        [self.delegate channelReusableViewDidClickEditBtn];
    }
}


@end
